'use strict';

const Controller = require('egg').Controller;

class SearchController extends Controller {
    async index() {
        const { ctx } = this;
        var { keyword } = ctx.query;
        const res = await ctx.service.movie.getMovieDetailOrSearch({ keyword: keyword });
        console.log(res);
        ctx.body = {
            msg: "搜索结果",
            res
        }
    }
}

module.exports = SearchController;
